07. Inner Loops: Roll and Sideslip Hold
Roll Attitude Hold
The roll attitude hold controller is a PD controller which uses the commanded roll angle \phi_c to command an aileron deflection \delta A.
\begin{aligned}
E_{\phi_t} &= \phi^c_t - \phi_t\\ \\
D_t &= \frac{E_{\phi_t} - E_{\phi_{t-1}}}{\Delta t} \\ \\
\delta A_t &= k_{p_\phi}E_t - k_{d_\phi}D_t
\end{aligned}
Sideslip Hold
The sideslip hold controller is a PI controller which uses the commanded sideslip angle \beta_c to command a rudder deflection \delta R. Generally, the commanded sideslip angle will be zero.
\begin{aligned}
E_{\beta_t} &= \beta^c_t - \beta_t\\
I_{\beta_t} &= I_{\beta_{t-1}} + E_{\beta_t}\Delta t\\
\delta R &= -k_{p_\beta}E_{\beta_t} - k_{i_\beta} I_{\beta_t}
\end{aligned}